<template>
  <Card style="width:350px;margin:150px auto;height:900px">
    <Row type="flex" align="middle">
      <Col span="8">流程节点编码:</Col>
      <Col span="14">
      <Input v-model="nodeCode" placeholder="请输入" style="width: 200px"></Input>
      </Col>
    </Row>
    <Row type="flex" align="middle">
      <Col span="8">流程节点名称:</Col>
      <Col span="14">
      <Input v-model="nodeName" placeholder="请输入" style="width: 200px"></Input>
      </Col>
    </Row>
    <Row type="flex" align="middle">
      <Col span="8">流程节点备注:</Col>
      <Col span="14">
      <Input v-model="remark" placeholder="请输入" style="width: 200px"></Input>
      </Col>
    </Row>
    <Row type="flex" align="middle" style="margin-top:20px">
      <Col span="9"></Col>
      <Col span="14">
      <Button type="primary" @click="subFlowNode" size="small">提交</Button>
      </Col>
    </Row>
  </Card>
</template>
<script>
export default {
  data () {
    return {
      nodeCode: null,
      nodeName: null,
      remark: null
    }
  },
  created () {
    this.$ajax = this.$util.ajax()
  },
  methods: {
    subFlowNode () {
      var params = {}
      params.nodeCode = this.nodeCode
      params.nodeName = this.nodeName
      params.remark = this.remark
      this.$ajax.post(this.$appContext.marvels_core_approve + 'approve/flow_node/service/add', params).then(re => {
        if (re.data.code === 'success') {
          this.$Message.warning('操作成功!')
        } else {
          this.$Message.warning(re.data.data)
        }
      }).catch(er => {
        this.$Message.warning('操作失败')
      })
    }
  }
}
</script>

<style lang="less">
  .xzqy-page {
    /*@media only screen and (min-width:1366px){
      .bottom-btn button:nth-of-type(1){
        margin-right:70px;
      }
    }
    @media only screen and (min-width:1200px){
      .bottom-btn button:nth-of-type(1){
        margin-right:40px;
      }
    }*/
  }
</style>
